﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 字符串类库;
using static 类.Program;

namespace 类
{
    class Program
    {
        static void Main(string[] args)
        {
            string name = "hello";
            bool v = StringUtils.isNotBlank(name);

            string v1 = StringUtils.join(",", "a", "b", "c");
            Console.WriteLine(v1);

            //Point p = new Point(1, 2);
            //Console.WriteLine(p.X +" "+ p.Y);

            //Point p = new Point();



            //var pair = new Pair<int, string>(1, "two");
            ////Pair<int,string> pair = new Pair<int, string>(1, "two");
            //int i = pair.First;     // TFirst int
            //string s = pair.Second; // TSecond string


            //Person sq = new Person();

            //sq._name = "yejing";
            //sq._age = 35;
            //sq.gender = 'N';
        


            Console.ReadKey();
        }

        public class Point
        {
            public int X { get; }
            public int Y { get; }

            // 有了自定义的构造函数，并且不是空参数的，
            // 那么就不会再提供空参数的默认构造函数。
            public Point(int x,int y)
            {
                this.X = x;
                this.Y = y;
            }

            //public Point(int x, int y) => (X, Y) = (x, y);

        }

        public class Pair<TFirst, TSecond>
        {
            public TFirst First { get; }
            public TSecond Second { get; }

            public Pair(TFirst first, TSecond second) =>
                (First, Second) = (first, second);
        }
    }

    /// <summary>
    /// 类似不占内存的，对象占内存
    /// </summary>
    class Person
    {
        public string _name;
        public int _age;
        public char gender;

        
    }
}
